package com.dv.driverless.service.impl;

import java.util.List;

import com.dv.driverless.domain.EquipmentFence;
import com.dv.driverless.mapper.EquipmentFenceMapper;
import com.dv.driverless.service.IEquipmentFenceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 安全围栏Service业务层处理
 *
 * @author ruoyi
 * @date 2023-04-06
 */
@Service
public class EquipmentFenceServiceImpl implements IEquipmentFenceService
{
    @Autowired
    private EquipmentFenceMapper equipmentFenceMapper;

    /**
     * 查询安全围栏
     *
     * @param id 安全围栏主键
     * @return 安全围栏
     */
    @Override
    public EquipmentFence selectEquipmentFenceById(Long id)
    {
        return equipmentFenceMapper.selectEquipmentFenceById(id);
    }

    /**
     * 查询安全围栏列表
     *
     * @param equipmentFence 安全围栏
     * @return 安全围栏
     */
    @Override
    public List<EquipmentFence> selectEquipmentFenceList(EquipmentFence equipmentFence)
    {
        return equipmentFenceMapper.selectEquipmentFenceList(equipmentFence);
    }

    /**
     * 新增安全围栏
     *
     * @param equipmentFence 安全围栏
     * @return 结果
     */
    @Override
    public int insertEquipmentFence(EquipmentFence equipmentFence)
    {
        return equipmentFenceMapper.insertEquipmentFence(equipmentFence);
    }

    /**
     * 修改安全围栏
     *
     * @param equipmentFence 安全围栏
     * @return 结果
     */
    @Override
    public int updateEquipmentFence(EquipmentFence equipmentFence)
    {
        return equipmentFenceMapper.updateEquipmentFence(equipmentFence);
    }

    /**
     * 批量删除安全围栏
     *
     * @param ids 需要删除的安全围栏主键
     * @return 结果
     */
    @Override
    public int deleteEquipmentFenceByIds(Long[] ids)
    {
        return equipmentFenceMapper.deleteEquipmentFenceByIds(ids);
    }

    /**
     * 删除安全围栏信息
     *
     * @param id 安全围栏主键
     * @return 结果
     */
    @Override
    public int deleteEquipmentFenceById(Long id)
    {
        return equipmentFenceMapper.deleteEquipmentFenceById(id);
    }

    /**
     * 修改安全围栏状态
     *
     * @param equipmentFence
     * @return 结果
     */
    @Override
    public int changeEquipmentFence(EquipmentFence equipmentFence) {
        return equipmentFenceMapper.changeEquipmentFence(equipmentFence);
    }
}
